<?php
/**
 * The following variables are available in this template:
 * - $this: the BootCrudCode object
 * @author Sofía Mejía
 */
/** @var AweCrudCode $this */
?>
<?php echo "<?php\n" ?>
/** @var <?php echo $this->controllerClass; ?> $this */
/** @var <?php echo $this->modelClass; ?> $model */
<?php
$label = $this->pluralize($this->class2name($this->modelClass));
?>
$this->menu = array(
array('label' => Yii::t('AweCrud.app', 'Create'),'icon' => 'icon-plus', 'url' => array('create'),'itemOptions' => array('class' => 'icon-4x pull-left icon-border')),
);


?>

<?php echo "<?php\n" ?>
$this->beginWidget(
        'bootstrap.widgets.TbBox', array(
    'title' => <?php echo "Yii::t('AweCrud.app', 'Manage') . ' ' . {$this->modelClass}::label(2)" ?>,
    'headerIcon' => 'icon-list',
        )
);
<?php echo "?>\n" ?>

    <?php echo "    <?php"; ?> 
    $this->widget('bootstrap.widgets.TbGridView',array(
    'id' => '<?php echo $this->class2id($this->modelClass); ?>-grid',
    'type' => 'striped bordered hover advance',
    'template' => "{items}{summary}{pager}",
    'dataProvider' => $model->search(),
    'filter' => $model,
    'columns' => array(
    <?php
    $count = 0;
    foreach ($this->tableSchema->columns as $column) {
        if ($column->isPrimaryKey) {
//        if ($column->isPrimaryKey || in_array($column->name, $this->descriptionFields)) {
            continue;
        }
        if (++$count == 7):
            ?>
            /*<?php echo "\n" ?>
        <?php endif; ?>
        <?php echo $this->generateGridViewColumn($this->modelClass, $column) . ",\n" ?>
        <?php
    }
    if ($count >= 7):
        ?>
        */<?php echo "\n" ?>
    <?php endif; ?>
    array(
    'class' => 'bootstrap.widgets.TbButtonColumn',
            ),
        ),
    )); ?>
<?php echo "<?php \$this->endWidget(); ?>\n" ?>